import request from '@/utils/request'

// 列表page
export function getList(form, pageSize, currentPage) {
  const data = {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  }
  return request.post('/sq/purchase/page', data)
}
// 列表详情
export function detailById(id) {
  return request.get(`/sq/purchase/wh/${id}`)
}
// 撤销
export function revoke(id) {
  return request.get(`/sq/purchase/return/revocation/${id}`)
}

/**
 * 删除
 * @param {*} id
 */
export function deleteById(id) {
  return request.delete(`/sq/purchase/del/${id}`)
}

// 退货出库
export function saleReturn(params) {
  return request.post(`/sq/purchase/wh/saleReturn`, params)
}
// 退货出库
export function inventoryOkOutBound(id) {
  return request.get(`/sq/purchase/return/inventoryOkOutBound/${id}`)
}
